import Vue from 'vue'
import App from './App.vue'
import axios from 'axios'
import VueRouter from 'vue-router'
axios.defaults.baseURL = 'https://www.escook.cn'
import 'bootstrap/dist/css/bootstrap.css'
import './assets/fonts/iconfont.css'

Vue.use(VueRouter)
const routes = [
  { path: '/', component: () => import('@/components/MyGoodsList') },
  { path: '/userinfo', component: () => import('@/components/MyUserInfo') },
  { path: '/search', component: () => import('@/components/MyGoodsSearch') },
]
const router = new VueRouter({ routes })

Vue.prototype.$axios = axios

Vue.config.productionTip = false
Vue.directive('focus', {
  inserted(el) {
    el.focus()
  },
})

new Vue({
  router,
  render: (h) => h(App),
}).$mount('#app')
